#ifndef DIALOGRUN_H
#define DIALOGRUN_H

#include <QDialog>
#include <QMessageBox>

//qt自带
#include <QtSerialPort/QSerialPort>
#include <QtSerialPort/QSerialPortInfo>
#include <QDebug>
#include <QTimer>

#include <QThread>
#include <QDateTime>
#include <stdbool.h>
#include <stdio.h>
#include <math.h>

//延时，TIME_OUT是串口读写的延时
#define TIME_OUT 10

namespace Ui {
class Dialogrun;
}

class Dialogrun : public QDialog
{
    Q_OBJECT

public:
    explicit Dialogrun(QWidget *parent = 0);
    ~Dialogrun();

private slots:
    void on_pushButton_2_clicked();

    void on_pushButton_clicked();

//    void readMyCom();
    void Read_Data();

private:
    Ui::Dialogrun *ui;
    QSerialPort *my_serialport;
    QTimer *timer;
    bool bClosing=false;
    int byteLen=0;
    double a[4],w[4],h[4],Angle[4],Port[4];
    double Temperature,Pressure,Altitude;//,GroundVelocity,GPSYaw,GPSHeight;
    //long Longitude,Latitude;
};

#endif // DIALOGRUN_H
